﻿Imports Microsoft.Office.Interop.Access

Namespace ModObjects

	Public Class AccessModObjectsToSVNTransformer
		Inherits AccessSvnTransformer

		Sub New()

			Me.app = AppContext.getRunningAccessComReference
			If Me.app Is Nothing Then
				Me.app = New Application
                Me.app.UserControl = False
			End If

            If AppContext.getAccessOpenFilePath( Me.app )=AppContext.current.getAccessDatabaseFullName then
                 Call Me.app.OpenCurrentDatabase(AppContext.current.getAccessDatabaseFullName)
            end if

		End Sub

		Public Overrides Sub Transform()
			Dim pr As New ModObjects.AccessModifiedObjectsProvider

			Dim lmodDate As DateTime = DateSerial(2011, 11, 14)
			lmodDate.AddHours(15)
			pr.setLastModificationDate(lmodDate)
            Dim l As List(Of AccessModifiedObject) = pr.getModifiedObjects(Me.app)

		End Sub

	End Class

End Namespace